<?php

include "connect.php";
$date=$_POST['date'];
$send_up_id=$_POST['send_up_id'];
$class_id=$_POST['class_id'];
$subject_id=$_POST['subject_id'];
$total_marks=$_POST['total_marks'];
$teacher_id=$_POST['teacher_id'];
$roll=$_POST['roll'];
$obt=$_POST['obt'];


$sq=mysql_query("select * From send_up where send_up_id='$send_up_id'");
while ($row = mysql_fetch_array($sq)) {
	
	$sq2=mysql_query("select * From send_up_detail where send_up_id='$send_up_id' AND roll_no='$roll'");
while ($row2 = mysql_fetch_array($sq2)) {
	
$sql=mysql_query("UPDATE send_up SET date='$date',send_up_id='$send_up_id',class_id='$class_id',subject_id='$subject_id',total_marks='$total_marks',teacher_id='$teacher_id'
  where send_up_id='$send_up_id'") or die (mysql_error());


mysql_query("UPDATE send_up_detail SET roll_no='$roll',obtain_marks='$obt'
  where send_up_id='$send_up_id' AND roll_no='$roll'") or die (mysql_error());

header("location:update_send_up_success.php");
}}
?>
